<template>
	<view class="item-title">
		<text class="require-code" v-if="required">*</text>
		<text class="title">{{ title }}</text>
		<text class="note" v-if="note">{{ note }}</text>
	</view>
</template>

<script>
	export default {
		props: {
			note: {
				type: String,
				default: '',
			},
			title: {
				type: String,
				default: '',
			},
			required: {
				type: Boolean,
				default: false,
			},
			marginBottom: {
				type: String,
				default: '32rpx'
			}
		},
		data() {
			return {
				
			}
		},
		methods: {
			
		}
	}
</script>

<style scoped lang="scss">
	.item-title {
		display: flex;
		align-items: center;
		margin-bottom: v-bind(marginBottom);
		.require-code {
			font-size: 30rpx;
			color: $uni-color-error;
		}
		.title {
			font-size: 30rpx;
			font-weight: bold;
			padding-right: 8rpx;
		}
		.note {
			font-size: 28rpx;
			color: #999;
		}
	}
</style>